fix(.asf.yaml): discussions notification target + real check names in branch protection - #3404
fix(.asf.yaml): discussions notification target + real check names in branch protection#3404deacon-mp wants to merge 7 commits into
Conversation
…ames in branch protection ASF Infra rejects the github feature block with 'GitHub discussions can only be enabled if a mailing list target exists for it' — features.discussions requires a notifications.discussions target. Route it to dev@, alongside issues and pullrequests. Because that error aborted the whole github block, protected_branches has never actually applied. Its required_status_checks contexts named workflows (Code Quality, Security Checks) rather than check runs, which would never be reported and would wedge every merge once active. Replace them with the six real job names as recorded on GitHub check runs. Review requirement (1 approving review, stale-review dismissal) and strict up-to-date checks now take effect deliberately.
There was a problem hiding this comment.
Pull request overview
This PR updates the repository’s Apache Infra self-service configuration (.asf.yaml) to (1) satisfy ASF’s requirement for enabling GitHub Discussions and (2) correctly enforce branch protection on master using real GitHub Actions check-run (job) names so merges aren’t inadvertently blocked.
Changes:
- Add a
notifications.discussionsemail target required forgithub.features.discussions: true. - Replace branch protection required-status-check contexts from workflow names to the concrete job/check-run names emitted by GitHub Actions.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Branch protection contexts match check-run names, so the generated "build (<python>, <toxenv>)" legs are renamed by any matrix edit. A required context that stops reporting blocks every merge and can only be cleared by Infra by hand -- which is the state master is in now, since the previously configured "Code Quality"/"Security Checks" contexts were workflow names that no check run ever reports. Add a hand-named aggregate job to each workflow that passes only when every matrix leg succeeded, and require those two contexts instead. The python matrix can then change without touching .asf.yaml.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 3 out of 3 changed files in this pull request and generated no new comments.
Suppressed comments (1)
.asf.yaml:67
- PR description says this fixes ASF Infra by setting
notifications.discussionstodev@caldera.apache.org, but the current.asf.yamlstill routes discussions (and issues/PRs) tonotifications@caldera.apache.org. Ifnotifications@is not an actual ASF list (as the header comment implies), Infra will likely continue to rejectgithub.features.discussions: trueand ignore the wholegithub:block. Also, the PR description mentions requiring six CI contexts, but the config now requires only the two aggregate jobs (ci-required,security-required). Please align the.asf.yamlnotifications + the PR description with the intended policy so Infra applies the config as expected.
contexts:
- ci-required # .github/workflows/quality.yml — gates the 4 python legs
- security-required # .github/workflows/security.yml — gates safety + bandit
Comment punctuation only. No configuration or job behaviour changes.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 3 out of 3 changed files in this pull request and generated no new comments.
Suppressed comments (2)
Previously missed (1) — in code that hasn't changed since the last review.
.asf.yaml:67
- PR description says master branch protection will require six CI contexts (the individual build matrix legs plus safety/bandit), but .asf.yaml now requires only the two aggregate jobs (ci-required, security-required). Please confirm the intended policy and update either the config or the PR description so they match.
contexts:
- ci-required # .github/workflows/quality.yml, gates the 4 python legs
- security-required # .github/workflows/security.yml, gates safety + bandit
.asf.yaml:4
- The notifications block still routes issues/pullrequests/jobs/discussions to notifications@caldera.apache.org, but the file’s own header comment and the PR description indicate those should go to dev@ (and notifications@ may not exist). This may not resolve the ASF Infra processing error for discussions, and the discussions line currently has trailing whitespace.
# .asf.yaml: Apache Infra self-service config for github.com/apache/caldera
# Reference: https://github.com/apache/infrastructure-asfyaml · https://infra.apache.org/asf-yaml.html
# This file lives at the repo ROOT and its `notifications:` block ONLY takes effect on the
# DEFAULT branch (master). Repo metadata/features (github:) are not branch-specific.
|
@pjfanning master can't merge anything right now.
This PR fixes the names. But it's blocked by the same rule and no committer has What's the best way to approach this fix? |
| contexts: | ||
| - Code Quality | ||
| - Security Checks | ||
| - ci-required # .github/workflows/quality.yml, gates the 4 python legs |
There was a problem hiding this comment.
as far as I know, this has to match the 'name' in the workflow - https://github.com/apache/caldera/blob/master/.github/workflows/quality.yml#L1
ie the current setting, not your new setting
https://github.com/apache/infrastructure-asfyaml is the project to raise discussions/issues on
Summary
Fixes the ASF Infra processing error emitted since #3400 merged:
Changes
notifications.discussions: dev@caldera.apache.org— per the asf.yaml spec,github.features.discussions: truerequires a discussions notification target. Routed to dev@ alongside issues and pullrequests traffic.protected_branchescontexts corrected to real check-run names. The previous contexts named workflows (Code Quality,Security Checks); GitHub required status checks match check-run (job) names, so those contexts would never be reported and — combined withstrict: true— would have wedged every merge the moment the block applied. Replaced with the six job names, verified byte-exact against the check runs recorded on master's head commit (46af343a): the fourbuild (3.x, ...coverage-ci)legs plusbuild (3.13, safety)andbuild (3.13, bandit).sonar_fork_pris deliberately excluded (only materializes on fork PRs).Effect when this lands
The discussions error has been aborting the entire
github:block, so none of it is currently applied. Once this merges and Infra processes it, the full block takes effect, including branch protection on master: 1 approving review required (stale reviews dismissed), the six CI contexts required, branches must be up to date, conversations must be resolved. This is a deliberate policy activation — from then on, PRs (including Dependabot's, whose six required contexts all still report) need a review before merge.